package com.blacktry.mapper;

import cn.hutool.core.lang.copier.SrcToDestCopier;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blacktry.entity.model.Admin;
import com.blacktry.entity.model.ExamManage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.blacktry.entity.model.request.ExamRequest;
import com.blacktry.entity.model.request.ScoreRequest;
import com.blacktry.entity.model.request.StudentRequest;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 考试管理表 Mapper 接口
 * </p>
 *
 * @author blackTry
 * @since 2021-06-24
 */
@Mapper
public interface ExamManageMapper extends BaseMapper<ExamManage> {

    List<ExamManage> selectAll();

      //学生端查看考试
     public Page<ExamManage> selectExamPage2(String userName , ExamRequest examRequest,Page<ExamManage> examManagePage);




      //教师查看考试
     public Page<ExamManage> teachSelectExamPage(ExamRequest examRequest, Page<ExamManage> examManagePage);


    List<ScoreRequest> selectByExamId(String examId);

    //根据考试id查询能参与的班级
    String seclctExamClass(String id);


    //根据考试id查询能参与的学生
    List<Admin> seclctExamStudent(String id);

    //根据班级查询包含的学生
    List<Admin> seclctStudentByclassName(String className);


    Integer selectGoodByExamId(String examId);

    Integer selectBadByExamId(String examId);

    Integer selectUnfinishedByExamId(String examId);

    List<StudentRequest> selectGoodStudentByExamId(String examId);

    List<StudentRequest> selectBadStudentByExamId(String examId);

    List<StudentRequest> selectUnfinishedStudentByExamId(String examId);

    List<StudentRequest> selectMissStudentByExamID(String examId);

    List<StudentRequest> selectMissStudentByExamID2(String examId);
}
